package com.rc.common.exception;


import com.rc.common.constant.Code;
import lombok.Getter;

/**
 * 业务异常
 * @author sym
 */
@Getter
public class BusinessException extends RuntimeException{
    private final Integer code;

    public BusinessException(Integer code, String msg){
        super(msg);
        this.code = code;
    }

    public BusinessException(Code statusCode) {
       this(statusCode.getCode(),statusCode.getMsg());
    }

}
